﻿<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Insert title here</title>
<%@ include file="../include/top.jsp"%>
<%@ include file="../include/errorArea.jsp"%>
<%@ include file="../include/message-save.jsp" %>
<script type="text/javascript">

$("#community").val("${formdata.community}");
$(function() { 
	 // 任何需要执行的js特效 
	checkBuilding('${ctx}');
	});

	$(document).ready(function(){
	
	var tablename=document.getElementById("listTable");
	var li=tablename.getElementsByTagName("tr");
	for (var i=1;i<=li.length;i++){
	if (i%2==0){
	li[i].style.backgroundColor="#f6f6f6";
	}else li[i].style.backgroundColor="#FFFFFF";
	}

});
</script>
</head>

<body>
<div class='adduser'>
	<div class='adduser-left'><div class='adduser-icon'></div><span>会员充值</span></div>
</div>
	<form action="${baseURL}/companyAdmin/addAccountBalance" method="post" onsubmit="return selectUser();">
		  <input type="hidden" name="p" value="1" />
		  <input type="hidden" name="communityId" value="${formdata.community}"/>
		<input type="hidden" name="buildId" value="${formdata.buildNo}"/>
		<input type="hidden" name="unitId" value="${formdata.unitNo}"/>
		<input type="hidden" name="roomId" value="${formdata.roomNo}"/>
		<input type="hidden" name="userId" value="${formdata.userNo}"/>
	
	<div class='querycondition'>
	<div class='condtion'>
		<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
	
  <tr><td>会员：<input type="text" id="realName" value="${formdata.realName}" name="realName" readonly="readonly" onclick="preCreateUser();"/>
   会员卡余额：<input type="text" id="accountBalance" value="${formdata.accountBalance}" name="accountBalance" readonly="readonly"/>元&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
   <input type="hidden" id="userNo" value="${formdata.userNo}" name="userNo" /></td></tr>
   <tr><td>
   充值金额：<input type="text" id="money" value="" name="money" />
    确认金额：<input type="text" id="remoney" value="" name="remoney" />
      </td></tr>
      <tr><td>
      收据号码：<input type="text" id="postNo" value="" name="postNo" />
      POS票号：<input type="text" id="posNum" value="" name="posNum" />
        </td></tr>
  <tr><td>充值方式：<input type="radio" value="0" name="tradeType" checked>现金</input>
      <input type="radio" value="1" name="tradeType">POS机</input>
  <input name="button" type="submit" value="充值" class="myButton"/>

  </td></tr>
		</table>
			</div>
</div>
		<c:if test="${not empty obj.list}">
		<div class='userlist-title'>
	<div class='userlist-title-left'><div class='userlist-title-icon'></div><span>充值记录</span></div>
</div>
<div class='userlist'>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" id="listTable">
  
     <tr class='userlist-tr-title'>
        
		<td class='userlist-td' width="10%">收据单号</td>
		<td class='userlist-td' width="10%">pos票号</td>
		<td class='userlist-td' width="15%">充值金额（元）</td>
		<td class='userlist-td' width="15%">充值类型</td>
		<td class='userlist-td' width="18%">充值日期</td>
	</tr>
	<c:forEach var="oneRow" items="${obj.list}">
		<tr align="center">
			 <td class='userlist-td'>${oneRow.seqNumber}</td>
			 <td class='userlist-td'>${oneRow.posNum}</td>
			<td class='userlist-td' style="text-align:right;">${oneRow.tradeMoney}</td>
			<td class='userlist-td'>
			<c:if test="${oneRow.tradeType==1}">服务站充值</c:if>
				<c:if test="${oneRow.tradeType==2}">商城平台充值</c:if>
				<!--<c:if test="${oneRow.tradeType==3}">商城平台订单支付</c:if>-->
			<c:if test="${oneRow.tradeType==6}">服务站充值返点</c:if></td>
			<td class='userlist-td'><fmt:formatDate value="${oneRow.createTime}" pattern="yyyy年MM月dd日" /> </td>
		</tr>
	</c:forEach>
		<tr align="center">
		<td class='userlist-td'>合计：</td>
		<td class='userlist-td'></td>
		<td class='userlist-td' style="text-align:right;">${formdata.tradeSum}</td>
		<td/>
		<td/>
		</tr>
        
  
</table>
<table>
	<tr>
	  <td height="25" colspan="9"><%@ include file="../include/listpage.jsp"%>
	  </td>
	</tr>
</table>
</div>
</c:if>
	</form>
	<script>
	function preCreateUser(){
		var user = document.getElementById("userNo").value;
		if(user!=null && user!="")
		$.layer({
		    type: 2,
		    maxmin: true,
		    shadeClose: true,
		    title: '会员详情',
		    shade: [0.1,'#fff'],
		    offset: [($(window).height() / 10)+'px',''],
		    area: ['600px', '400px'],
		    iframe: {src: '${ctx}/companyAdmin/showUser?uid='+user}
		}); 
	}
	</script>
<script src="${ctx}/js/buyProduct.js"></script>
</body>
</html>
  
